<table width=100% border=0 cellpadding=12 cellspacing=1 class='tours'>
<!--
  <thead>
	 <tr class="6px">
		<td>
		  {t}Date{/t}
		</td>
		<td>
		  {t}Boat{/t}
		</td>
		<td>
		  {t}Route{/t}
		</td>
		<td>
		  {t}Places available{/t}
		</td>
		<td>
		  {t}Price{/t}
		</td>
		<td>
		  {t}Request{/t}
		</td>
	 </tr>
  </thead>
-->
  {assign var="prev_month" value='0'}
  
  {foreach from=$toursList item=tour}
  {if $tour.m != $prev_month}
	
	<tr class="6px head">
		<td>
			{if $tour.same_year && $tour.duration_days >= 364}
				{t}January{/t} - {t}December{/t}
			{else}
				{t}{$tour.month_name}{/t}
			{/if}
		</td>
		<td>
		  {t}Boat{/t}
		</td>
		<td>
		  {t}Route{/t}
		</td>
		<td>
		  {t}Places available{/t}
		</td>
		<td>
		  {t}Price{/t}
		</td>
		<td>
		  {t}Request{/t}
		</td>
	 </tr>
  {/if}
  {assign var="prev_month" value=$tour.m}
  <tr bgcolor="#FFFFFF" class="6px"
	{if $tour.same_year && $tour.duration_days >= 364}
		style="background-color:lightpink;"
	{/if}
  >
	 <td class="6px">
		{if $tour.same_year && $tour.duration_days >= 364}
			{$tour.start_date|date_format:"%Y"}
		{else}
			{$tour.start_date} - {$tour.end_date}
		{/if}
	 </td>
	 <td class="6px">
		<a href="boat.php?id={$tour.boat_id}">{$tour.boat_name}</a>
	 </td>
	 <td class="6px">
		{if $tour.rout_id}
			<a href="rout.php?id={$tour.rout_id}">{$tour.rout_name}</a>
		{else}
			{t}by request{/t}
		{/if}
	 </td>
	 <td class="6px">
		{$tour.places_available}
	 </td>
	 <td class="6px">
		{if $tour.price}
			{$tour.price}
		{else}
			{if !$tour.rout_id}
				{t}by request{/t}
			{/if}
		{/if}
	 </td>
	 <td  class="6px">
		<a href="request.php?tourId={$tour.id}">Request</a>
	 </td>
  </tr>
  {/foreach}

</table>
